<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>后台管理-申请试用</title>
		<link rel="stylesheet" href="/resources/src/css/lib/bootstrap.min.css">
		<link rel="stylesheet" href="/resources/src/css/admin/main.css" />
		<link rel="stylesheet" href="/resources/src/css/admin/user-manage.css" />
    </head>
    <body>
		<article class="main">
			<div class="main-wrapper">
				<section class="content">
					<div class="container">
						<div class="con-header">
							<jsp:include page="../common/folderbar.jsp" />
						</div>
						<div class="con-body">
							<div class="toolbar clearfix">
								<div class="toolbar-left toolbar-one pull-left">
									<a href="#" id="checkout" class="pull-left">导出</a>
								</div>
								<div class="toolbar-right pull-left">
									<div class="input-icon">
										<input type="text" id="search" placeholder="输入用户名/手机/邮箱查询"/>
										<i class="iconfont icon-sousuo" id="search-btn"></i>
									</div>
								</div>
							</div>
							<div class="user-table table-responsive">
								<table class="table">
									<thead>
										<tr>
											<th>机构名</th>
											<th>联系人电话</th>
											<th>联系人姓名</th>
											<th>申请时间<i id="applyTime" class="iconfont icon-paixu" data-order="0"></i></th>
											<th data-toggle="joDropdown">
												处理进度<i class="iconfont icon-caidanshaixuan"></i>
												<ul data-toggle="joMenu">
													<li><a href="">全部</a></li>
													<li><a href="">未处理</a></li>
													<li><a href="">已接触</a></li>
													<li><a href="">对方考虑中</a></li>
													<li><a href="">考虑后不试用</a></li>
													<li><a href="">已开通账号</a></li>
												</ul>
											</th>
											<th data-toggle="joDropdown">
												备注<i class="iconfont icon-caidanshaixuan"></i>
												<ul data-toggle="joMenu">
													<li><a href="">全部</a></li>
													<li><a href="">有</a></li>
													<li><a href="">无</a></li>
												</ul>
											</th>
										</tr>
									</thead>
									<tbody>
										<tr data-userId="215">
											<td>雷雨资本</td>
											<td>13415641565</td>
											<td>胡端彪</td>
											<td>2017年5月11日 14:22:23</td>
											<td>审核</td>
											<td><a href="#">查看</a><a data-btn="addRemark">添加</a></td>
										</tr>
									</tbody>
								</table>		
							</div>
						</div>
						<div class="con-footer text-center">
							<div class="pagination clearfix">
								<span class="pull-left">共有12条记录，第1页，共有2页</span>
								<a href="#" class="first pull-left">首页</a>
								<a href="#" class="prev pull-left">上一页</a>
								<a href="#" class="next pull-left">下一页</a>
								<a href="#" class="last pull-left">末页</a>
								<input type="text" class="pull-left" id="page" placeholder="1"/>
								<a href="#" id="go-page" class="pull-left">确定</a>
							</div>
						</div>
					</div>
				</section>
			</div>
		</article>
		
		<!-- 添加备注模态框 -->
		<div class="joModal" id="addRemark-modal" data-liffect="fadeIn">
			<div class="joModal-dialog">
				<div class="joModal-content" data-liffect="slideTop" style="width:554px; height:285px;">
					<div class="joModal-header">
						<h1 class="title">添加备注</h1>
					</div>
					<div class="joModal-body">
						<div style="width:534px;height:148px;margin-top:10px; margin-left:auto; margin-right:auto;padding:10px 15px; box-sizing:border-box;background-color:#f2f2f2;">
							<textarea name="remark" maxlength="200" style="width:100%; height:100%;resize: none;border:0;outline:0;line-height:150%;overflow:hidden;text-align:justify;background-color:transparent;"></textarea>
						</div>
					</div>
					<div class="joModal-footer clearfix" style="padding-top:20px;">
						<a class="pull-left cancel modal-btn" data-modal="close" style="margin-left:138px;">取消</a>
						<a class="pull-left confirm modal-btn">确定</a>
					</div>
				</div>
			</div>	
		</div>
		
		<script src="/resources/src/js/jquery-2.1.4.js"></script>
		<script src="/resources/src/js/jquery.nicescroll.js"></script>
		<script src="/resources/src/js/admin/main.js"></script>
		<script>
			$(function(){
			
				//搜索
			 	$("#search-btn").on("click",function(){
			 		var value=$("#search").val().trim();
			 		if(value!="" && value!=null){
			 			console.log(value);
			 			/*
			 			$.ajax({
			 				type:"get",
			 				url:"",
			 				async:true,
			 				data:"",
			 				success:function(data){
			 					//do something
			 				}
			 			});*/
			 		}
			 	});
			 	
			 	//以申请时间排列,order为0时执行升序排列，为1时执行降序排列
			 	$("#applyTime").on("click",function(){
			 		var order=$(this).attr("data-order");
			 		if(order==="0"){
			 			//升序
			 			$(this).attr("data-order","1");
			 		}else{
			 			//降序
			 			$(this).attr("data-order","0");
			 		}
			 	});
			 	
			 	//添加备注
			 	userTable.delUser("#addRemark-modal .confirm",function(data){
			 		//参数data为表格行的id(data-userId)的值
			 		console.log(data);
			 		Global.modal("#addRemark-modal","show");
			 	});
	
				//分页操作，跳转到某页
			 	$("#go-page").on("click",function(){
			 		var page=$("#page").val().trim();
			 		if(page!="" && page!=null){
			 			//do something
			 		}
			 	});
			});
		</script>
		
 	</body>
</html>